package system;

import entity.Employee;
import java.util.ArrayList;
import java.util.List;


public class SalaryManagementSystem {
    private List<Employee> employees;

    public SalaryManagementSystem() {
        employees = new ArrayList<>();
    }


    public void addEmployee(Employee employee) {
        employees.add(employee);
    }


    public List<Employee> getEmployees() {
        return new ArrayList<>(employees);
    }


    public void displayAllPaySlips() {
        for (Employee emp : employees) {
            System.out.println(emp.generatePaySlip());
            System.out.println();
        }
    }
}